import { Menu } from 'antd';

function Nav(props) {
  const { changTab,  defaultSelectedKeys } = props;
  const navClick = (e) => {
    changTab(e.key);
  };
  return (
    <>
      <div className="logo" />
      <Menu theme="dark" mode="horizontal" defaultSelectedKeys={[defaultSelectedKeys]} onClick={navClick}>
        <Menu.Item key="1">Home</Menu.Item>
        <Menu.Item key="2">Weather</Menu.Item>
        <Menu.Item key="3">Covid status</Menu.Item>
        <Menu.Item key="4">Traffic</Menu.Item>        
      </Menu>
    </>
  );
}

export default Nav;